Repository navigation
poc(id): currency gateway boundary — UserDO snapshot cache, signed transfer + hold, idempotent retry (#2298) - #9803
Conversation
…rnation idempotency (#2298)
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 31 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
# Conflicts: # pkgs/id/hosted-worker/package.json
|
Shepherd review — task 19746 (lane any-t): Codex gate disposition + full review of PR #9803 Codex gate (§5), dispositioned: the Codex summary's metadata ( Review (all 8 files read in full at head d8970e3):
Currency proofs re-run: at the PR head, Verdict: merge. The PoC lands reviewed, with the proofs green; issue #2298's acceptance (gateway boundary PoC with signed transfer + hold and idempotent retry across hibernation) is met by proofs 1–4 + 4b in the suite. |
PoC: currency gateway boundary (#2298) — FLAGGED FOR A REVIEW ROUND
Per the issue's gate note: this is a proof of concept that makes its
own simplifications. Flagged for a review round — do not build the
permanent currency service on top of it unreviewed. This PR is
therefore left open for review rather than self-merged.
Gates were respected: work started only after (a) the #2043 synthesis
accepted the #2066 boundary via Drew's recorded ruling
hosted-boundary-2298 (2026-11-12), and (b) the #2062 control-plane
design landed (#2062 closed, PR #2315 merged).
What is here (pkgs/id/hosted-worker/src/currency/)
(Drew's ruling: do not block on TigerBeetle). TigerBeetle-shaped
semantics where the proofs depend on them: unique request IDs,
exists_with_different_fields on a mutated retry, two-phase
holds (pending → post/void), per-account transfer watermark.
POST /v1/transfers, POST /v1/holds + post/void,
GET /v1/balances/{account} returning a gateway-signed snapshot
(balance + pending + watermark, signed by the server's token
admin key, server-scoped), GET /v1/transfers/{request_id} for
reconciliation, and bilateral signed double-entry for
cross-server transfers. Client-signed intents only — the gateway
holds client public keys, never signing keys.
{request ID, intent hash, state} BEFORE the gateway fetch, caches
the gateway-signed snapshot verbatim (signed snapshots only, never
ledger truth), reconciles by request-ID lookup on wake.
domain-separated signing payloads matching the §6 posture of
pkgs/id/src/hosted_export.rs.
Proofs (test/currency.test.ts, named oracles = the issue's four proofs)
routing tests). Covers: gateway endpoints + signed snapshot
verification and server scoping; unsigned/wrong-key rejection;
client-signed transfer and hold → post (and hold → void) through
the relay; intent persisted before the gateway fetch; hibernation
(response lost → wake reconciles by lookup → same-ID retry yields
exactly one transfer); mutated retry under the same ID surfaces
exists_with_different_fields as a hard error (409 / RelayError);
cross-server bilateral signed double-entry.
Results doc + simplifications
doc/2026-11-14T06-22-00Z_poc_currency_gateway_boundary_results/ —
the issue's acceptance doc: the four proofs with commands/output and
the explicit list of every simplification (in-process ledger stub,
relay not yet routed through worker.ts, standalone keys instead of
Iroh-derived, in-process fetch transport, no registry UI / central
token provider / production auth).
Refs #2298. Queue task 15851 (lane any-a).
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.